//
//  BVFeedBackViewController.m
//  XiangYu
//
//  Created by YYKJ on 2017/6/10.
//  Copyright © 2017年 YYKJ. All rights reserved.
//  意见反馈

#import "BVFeedBackViewController.h"
#import "BVTextView.h"

@interface BVFeedBackViewController ()

@property (nonatomic ,strong) BVTextView       *contentTextV;

@end

@implementation BVFeedBackViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view setBackgroundColor:[UIColor BVBackgroundLightGrayColor]];
    [self.navigationItem setTitle:@"意见反馈"];
    
    [self setNav];
    [self layoutUI];
    
}
-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    
    [self.view endEditing:YES];
    
}

-(void)setNav{
    
    UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [rightBtn setFrame:CGRectMake(0, 10, 40, 28)];
    [rightBtn setTitle:@"提交" forState:UIControlStateNormal];
    [rightBtn.titleLabel setFont:[UIFont systemFontOfSize:16]];
    [rightBtn.titleLabel setTextAlignment:NSTextAlignmentRight];
    //    [rightBtn addTarget:self action:@selector(showRight:) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *rightBarBtn = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
    [self.navigationItem setRightBarButtonItem:rightBarBtn];
    
}

-(void)layoutUI{
    
    UIView *bgView = [[UIView alloc]init];
    [self.view addSubview:bgView];
    [bgView setBackgroundColor:[UIColor whiteColor]];
    [bgView setFrame:CGRectMake(10, 20, ScreenW-20, 150)];
    [bgView.layer setBorderColor:[[UIColor BVLineGrayColor] CGColor]];
    [bgView.layer setBorderWidth:1.0];
    [bgView.layer setMasksToBounds:YES];
    [bgView.layer setCornerRadius:5.0];
    
    self.contentTextV = [[BVTextView alloc] init];
    [bgView addSubview:self.contentTextV];
    self.contentTextV.placeholder = @" 请写下您的宝贵意见...";
    self.contentTextV.placeholderColor = [UIColor BVTextGrayColor];
    self.contentTextV.frame = CGRectMake(0, 0, ScreenW-20, 150);
    self.contentTextV.textColor = [UIColor BVTextGrayColor];;
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}

@end
